package com.gdit.zax.utils;

import java.io.UnsupportedEncodingException;

public class UrlDecoder {
	/**
	 * 解决http://baidu.com?name="我"  乱码问题
	 * @param str
	 * @return
	 */
	public static String getUtf8String (String str) {
		if (str==null) {
			return null;
		}
		
		String newstr=null;
		try {
			newstr = new String(str.getBytes("ISO-8859-1"), "utf-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
			newstr = str;
		}
		return newstr;
	}
}
